package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.Do.HzCommentDo;
import com.ruoyi.system.domain.co.HzCommentCo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HzCommentMapper;
import com.ruoyi.system.domain.HzComment;
import com.ruoyi.system.service.IHzCommentService;
import com.ruoyi.common.core.text.Convert;

/**
 * 评论实体Service业务层处理
 *
 * @author ruoyi
 * @date 2021-08-08
 */
@Service
public class HzCommentServiceImpl implements IHzCommentService {
    @Autowired
    private HzCommentMapper hzCommentMapper;

    @Override
    public List<HzCommentDo> CommentList(HzCommentCo comment) {
        return hzCommentMapper.CommentList(comment);
    }


    /**
     * 查询评论实体
     *
     * @param id 评论实体ID
     * @return 评论实体
     */
    @Override
    public HzComment selectHzCommentById(Long id) {
        return hzCommentMapper.selectHzCommentById(id);
    }

    /**
     * 查询评论实体列表
     *
     * @param hzComment 评论实体
     * @return 评论实体
     */
    @Override
    public List<HzComment> selectHzCommentList(HzComment hzComment) {
        return hzCommentMapper.selectHzCommentList(hzComment);
    }

    /**
     * 新增评论实体
     *
     * @param hzComment 评论实体
     * @return 结果
     */
    @Override
    public int insertHzComment(HzComment hzComment) {
        return hzCommentMapper.insertHzComment(hzComment);
    }

    /**
     * 修改评论实体
     *
     * @param hzComment 评论实体
     * @return 结果
     */
    @Override
    public int updateHzComment(HzComment hzComment) {
        return hzCommentMapper.updateHzComment(hzComment);
    }

    /**
     * 删除评论实体对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteHzCommentByIds(String ids) {
        return hzCommentMapper.deleteHzCommentByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除评论实体信息
     *
     * @param id 评论实体ID
     * @return 结果
     */
    @Override
    public int deleteHzCommentById(Long id) {
        return hzCommentMapper.deleteHzCommentById(id);
    }
}
